/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       options.cpp

+	$Header: /game/options.cpp $

	$NoKeywords: $

 ************************************************************************/

#include "precompiled.h"
#include "options.h"
#include "music.h"

static bool g_army_movement_reminder = true;
static int  g_army_speed   = 150;
static int  g_combat_speed = 150;
static bool g_enable_auto_play = false;
static bool g_enable_shroud = true;
static int  g_enemy_speed  = 200;
static bool g_guard_move_preference = true;
static bool	g_show_adventure_animations = true;
static bool g_show_adventure_coordinates = true;
static bool g_show_cheat_menus = false;
static bool g_show_combat_damage = true;
static bool g_show_combat_deaths = true;
static bool g_show_combat_movement_shading = false;
static bool g_show_enemy_moves = true;
static bool g_show_other_combat_text = true;
static bool g_show_move_path = true;
static bool g_use_quick_combat = false;
static bool g_show_combat_grid = false;

int get_army_animation_speed()
{
	return g_army_speed;
}

int get_combat_animation_speed()
{
	return g_combat_speed;
}

bool get_enable_auto_play()
{
	return g_enable_auto_play;
}

bool get_enable_shroud()
{
	return g_enable_shroud;
}

int get_enemy_animation_speed()
{
	return g_enemy_speed;
}

bool get_guard_move_preference()
{
	return g_guard_move_preference;
}

bool	get_show_combat_damage()
{
	return g_show_combat_damage;
}

bool	get_show_combat_deaths()
{
	return g_show_combat_deaths;
}

bool    get_show_combat_grid()
{
	return g_show_combat_grid;
}

bool	get_show_combat_movement_shading()
{
	return g_show_combat_movement_shading;
}

bool	get_show_other_combat_text()
{
	return g_show_other_combat_text;
}

void set_army_animation_speed( int arg )
{
	g_army_speed = arg;
}

void set_combat_animation_speed( int arg )
{
	g_combat_speed = arg;
}

void set_enable_auto_play( bool arg )
{
	g_enable_auto_play = arg;
}

void set_enable_shroud( bool arg )
{
	g_enable_shroud = arg;
}

void set_enemy_animation_speed( int arg )
{
	g_enemy_speed = arg;
}

void set_guard_move_preference( bool arg )
{
	g_guard_move_preference = arg;
}

void set_quick_combat( bool arg )
{
	g_use_quick_combat = arg;
}

void set_show_adventure_animations( bool arg )
{
	g_show_adventure_animations = arg;
}

void set_show_cheat_menus( bool arg )
{
	g_show_cheat_menus = arg; // don't save as a config value.
}

void set_show_combat_damage( bool arg )
{
	g_show_combat_damage = arg;
}

void set_show_combat_deaths( bool arg )
{
	g_show_combat_deaths = arg;
}

void set_show_combat_grid( bool arg )
{
	g_show_combat_grid = arg;
}

void set_show_combat_movement_shading( bool arg )
{
	g_show_combat_movement_shading = arg;
}

void set_show_enemy_moves( bool arg)
{
	g_show_enemy_moves = arg;
}


void set_show_other_combat_text( bool arg )
{
	g_show_other_combat_text = arg;
}

bool use_quick_combat()
{
	return g_use_quick_combat;
}

void set_show_adventure_coordinates( bool arg )
{
	g_show_adventure_coordinates = arg;
}

bool show_adventure_coordinates()
{
	return g_show_adventure_coordinates;
}

void set_army_movement_reminder( bool arg )
{
	g_army_movement_reminder = arg;
}

bool army_movement_reminder()
{
	return g_army_movement_reminder;
}

bool show_adventure_animations()
{
	return g_show_adventure_animations;
}

bool show_cheat_menus() 
{
	return g_show_cheat_menus;
}

void set_show_move_path( bool arg )
{
  g_show_move_path = arg;
}

bool show_enemy_moves()
{
	return g_show_enemy_moves;
}

bool show_move_path()
{
    return g_show_move_path;
}
        
void load_options()
{
	int quick_combat = 0;
	int adventure_coordinates = 0;
	int movement_reminder = 0;
	int show_move_path = 0;
	int enable_auto_play = 0;
	int enable_shroud = 1;
	int show_animations = 1;
	int show_damage = 1;
	int show_deaths = 1;
	int show_moves = 1;
	int show_other_text = 1;
	int guard_preference;
	int show_combat_movement_shading = 0;
	int show_combat_grid = 0;

  g_army_speed = 150;
	g_combat_speed = 150;
	g_enemy_speed = 200;
	quick_combat = 0;
	g_use_quick_combat = quick_combat != 0;
	guard_preference = 1;
	g_guard_move_preference = guard_preference != 0;
	show_animations = 1;
	g_show_adventure_animations = (show_animations != 0);
	show_damage = 1;
	g_show_combat_damage = (show_damage != 0);
	show_deaths = 1;
	g_show_combat_deaths = (show_deaths != 0);
	show_moves = 1;
	g_show_enemy_moves = (show_moves != 0);
	
  show_other_text = 1;
  g_show_other_combat_text = (show_other_text != 0);

  show_combat_movement_shading = 0;
  g_show_combat_movement_shading = ( show_combat_movement_shading != 0 );

  show_combat_grid = 0;
  g_show_combat_grid = ( show_combat_grid != 0 );


  adventure_coordinates = 1;
  g_show_adventure_coordinates = adventure_coordinates != 0;

  movement_reminder = 1;
  g_army_movement_reminder = movement_reminder != 0;

  show_move_path = 1;
  g_show_move_path = show_move_path != 0;
  g_enable_auto_play = enable_auto_play != 0;

  enable_shroud = 1;
  g_enable_shroud = enable_shroud != 0;
	
	int volume = 0;
  set_sound_volume( volume );	
	set_music_volume( volume );
}
